import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [
    vue()],
  //配置的内容
  server: {
    proxy: {
      '/api': {
        target: 'http://localhost:5137',
        // target: 'https://api.zhyunxi.com/api.php',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '') // 可选，用于重写请求路径
      }
    }
  }
 
})
